home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dskut / fips11.zip / SOURCE / FIPSSPEC.H < prev    next >
C/C++ Source or Header  |  1994-05-25  |  3KB  |  100 lines

  1. /*
  2.     FIPS - the First nondestructive Interactive Partition Splitting program
  3.  
  4.     Module fipsspec.h
  5.  
  6.     RCS - Header:
  7.     $Header: c:/daten/fips/source/main/RCS/fipsspec.h 1.1 1994/05/25 22:20:28 schaefer Exp schaefer $
  8.  
  9.     Copyright (C) 1993 Arno Schaefer
  10.  
  11.     This program is free software; you can redistribute it and/or modify
  12.     it under the terms of the GNU General Public License as published by
  13.     the Free Software Foundation; either version 2 of the License, or
  14.     (at your option) any later version.
  15.  
  16.     This program is distributed in the hope that it will be useful,
  17.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  18.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19.     GNU General Public License for more details.
  20.  
  21.     You should have received a copy of the GNU General Public License
  22.     along with this program; if not, write to the Free Software
  23.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  24.  
  25.  
  26.     Report problems and direct all questions to:
  27.  
  28.     schaefer@rbg.informatik.th-darmstadt.de
  29. */
  30.  
  31. #ifndef FIPSSPEC_H
  32. #define FIPSSPEC_H
  33.  
  34. #include "logdr_st.h"
  35. #include "hdstruct.h"
  36.  
  37. class fips_bpb:public bios_parameter_block
  38. {
  39. public:
  40.     void print (void);
  41.     void calculate_new_boot (const partition_info &partition_info);
  42. };
  43.  
  44. class fips_partition_table:public partition_table
  45. {
  46. public:
  47.     void print (void);
  48.     void calculate_new_root (dword new_start_cylinder,partition *partition,const drive_geometry &geometry);
  49. };
  50.  
  51. class fips_harddrive:public harddrive
  52. {
  53.     fips_partition_table pr_partition_table;
  54. protected:
  55.     void get_geometry (void);
  56. public:
  57.     void reset (void);
  58.     class partition_table &partition_table() { return pr_partition_table; }
  59.     void print_partition_table (void) { pr_partition_table.print(); }
  60.     void calculate_new_root (dword new_start_cylinder,partition *partition)
  61.     {
  62.         pr_partition_table.calculate_new_root (new_start_cylinder,partition,geometry);
  63.     }
  64.     void check (void);
  65.  
  66.     fips_harddrive (int number):harddrive (number) { get_geometry(); }  // to write register info to debugfile
  67.     fips_harddrive (fips_harddrive &hd):harddrive (hd) {}
  68.     void operator= (fips_harddrive &hd)
  69.     {
  70.         harddrive::operator= (hd);
  71.     }
  72. };
  73.  
  74. class fips_logdrive_info:public logical_drive_info
  75. {
  76. public:
  77.     void put_debug_info (void);
  78. };
  79.  
  80. class fips_partition:public partition
  81. {
  82.     fips_bpb pr_bpb;
  83.     fips_logdrive_info pr_info;
  84. public:
  85.     bios_parameter_block &bpb() { return pr_bpb; }
  86.     logical_drive_info &info() { return pr_info; }
  87.  
  88.     void print_bpb (void) { pr_bpb.print(); }
  89.     void write_info_debugfile (void) { pr_info.put_debug_info(); }
  90.     void calculate_new_boot (void)
  91.     {
  92.         pr_bpb.calculate_new_boot (*partition_info);
  93.     }
  94.     void check (void);
  95.  
  96.     fips_partition (class fips_harddrive *drive,int number):partition(drive,number) {}
  97. };
  98.  
  99. #endif
  100.